package com.fg.pro.trade.entity;

import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * 单位(TradeUnit)表实体类
 *
 * @author makejava
 * @since 2025-08-13 09:37:31
 */
@SuppressWarnings("serial")
@Data
public class TradeUnit extends Model<TradeUnit> {
//主键
    private Long id;

    private Date createTime;

    private Date updateTime;
//名称
    private String unitName;
//如有则表示是企业自定义单位
    private Long unitGroupId;
//类型 0：无 1：长度 2：面积 3：容积|体积 4：质量|重量 5：数量repeated Ssu  允许值: 0, 1, 2, 3, 4, 5
    private Integer unitType;
//id/parent_id 单位是「3斤/袋」的含义是 「3斤= 1袋」，所以比率（unit.rate） =「1袋/1斤 = 3」
    private String unitRate;
//如有则表示是企业自定义单位
    private Long unitParentId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public Long getUnitGroupId() {
        return unitGroupId;
    }

    public void setUnitGroupId(Long unitGroupId) {
        this.unitGroupId = unitGroupId;
    }

    public Integer getUnitType() {
        return unitType;
    }

    public void setUnitType(Integer unitType) {
        this.unitType = unitType;
    }

    public String getUnitRate() {
        return unitRate;
    }

    public void setUnitRate(String unitRate) {
        this.unitRate = unitRate;
    }

    public Long getUnitParentId() {
        return unitParentId;
    }

    public void setUnitParentId(Long unitParentId) {
        this.unitParentId = unitParentId;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

